function [ptptP0, ptptptP0]=partialp0(m,v,x,K)

f2 = @(y) ((m-log(y/x)).^2+v^2*(m-log(y/x)))/v^4/x^2;

f3 = @(y) -(v^2+m-log(y/x)).*((m-log(y/x)).^2+2*v^2*(m-log(y/x))-3*v^2)/v^6/x^3;

ptptP0 = quadgk(@(y) max(y-K,0).*f2(y).*lognpdf(y/x,m,v)/x,-Inf, Inf);
ptptptP0 = quadgk(@(y) max(y-K,0).*f3(y).*lognpdf(y/x,m,v)/x,-Inf, Inf);
